from django.db import models

# Create your models here.
from django.db import models

# Create your models here.
# models.py文件中每一个类都对应于数据库中的一张表。

# 经济


class economy(models.Model):
    city = models.CharField(max_length=32, default="默认值")
    # year = models.IntegerField()
    # month = models.IntegerField()
    gdp = models.FloatField()
    per_income = models.FloatField()  # 城镇居民可支配收入
    cpi = models.FloatField()
    eva = models.FloatField()  # 规模以上工业增加值
    year = models.IntegerField()

# 生态


class ecology(models.Model):
    city = models.CharField(max_length=32, default="默认值")
    # year = models.IntegerField()
    # month = models.IntegerField()
    forest_cover = models.FloatField()
    forest_area = models.FloatField()
    water_resource = models.FloatField()
    dirty_water = models.FloatField()
    year = models.IntegerField()

# 碳排放


class carbon(models.Model):
    city = models.CharField(max_length=32, default="默认值")
    # year = models.IntegerField()
    # month = models.IntegerField()
    raw_coal = models.FloatField()
    natural_gas = models.FloatField()
    oil = models.FloatField()
    carbon_dioxide = models.FloatField()
    year = models.IntegerField()

# 能源结构


class energy(models.Model):
    city = models.CharField(max_length=32, default="默认值")
    # year = models.IntegerField()
    # month = models.IntegerField()
    energy_c = models.FloatField()
    coal_c = models.FloatField()
    gas_c = models.FloatField()
    oil_c = models.FloatField()
    electricity_c = models.FloatField()
    year = models.IntegerField()

# class all_teble(models.Model):

    # class Meta:
    #     db_table = 'db'
    #     ordering = ['c_time']  # 默认正序，倒序的话是'-c_time'
    #     verbose_name = '用户信息'
    #     verbose_name_plural = verbose_name
